Capsules and Closures
نویسنده
چکیده
Capsules are a clean representation of the state of a computation in higher-order programming languages with effects. Their intent is to simplify and replace the notion of closure. They naturally provide support for functional and imperative features, including recursion and mutable bindings, and ensure lexical scoping without the use of closures, heaps, stacks or combinators. We present a comparison of the use of closures and capsules in the semantics of higher-order programming languages with effects. In proving soundness of one to the other, we give a precise account of how capsule environments and closure environments relate to each other.
منابع مشابه
Capsules and Closures: A Small-Step Approach
We present a side by side comparison of Capsules and Closures, including a proof of bisimilarity, using small-step semantics. A similar proof was presented in [8], using big-step semantics. However, while big-step semantics only allow to talk about final results of terminating computations, the use of small-step semantics allows to prove a stronger bisimilarity involving every step of the compu...
متن کاملComputing with Capsules
Capsules provide a clean algebraic representation of the state of a computation in higherorder functional and imperative languages. They play the same role as closures or heapor stack-allocated environments but are much simpler. A capsule is essentially a finite coalgebraic representation of a regular closed λ-coterm. One can give an operational semantics based on capsules for a higher-order pr...
متن کاملNumerical Modeling of Saline Gravity Currents Using EARSM and Buoyant k- Turbulence Closures
Gravity currents are very common in nature and may appear in rivers, lakes, oceans, and the atmosphere. They are produced by the buoyant forces interacting between fluids of different densities and may introduce sediments and pollutants into water bodies. In this study, the hydrodynamics and propagation of gravity currents are investigated using WISE (Width Integrated Stratified Environments), ...
متن کاملR-parts in hyperrings
In this article, first we generalize the concept of complete parts in hyperrings by introducing the concept R-parts in hyperrings and then we study R-closures in hyperrings. Finally we characterize R-closures in hyperfields.
متن کاملSynaptophysin-Positive Neurons in External And Extreme Capsules in Human Brain
Purpose: Externaland extreme capsules are parts of cerebral white matter, and accordingto the classic knowledge they must have no neuronal cell bodies.This researchis designedto find neurons in the external and extreme capsules, and to determine that these neurons are functional or aberrant. Materitais and Methods: Ten adult normal human brains from both sexes were studied using 15,µm serial c...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- Electr. Notes Theor. Comput. Sci.
دوره 276 شماره
صفحات -
تاریخ انتشار 2011